#
# qcarcam_test
#
LOCAL_PATH := $(call my-dir)
##每个Android.mk文件都以LOCAL_PATH开始，Build System提供的宏函数 my-dir，此变量返回包含的makefile的路径；CLEAR_VARS不会清楚LOCAL_PATH变量

include $(CLEAR_VARS)
##CLEAR_VARS变量由Build System提供，并指向一个特定的GNU Makefile，可为你清除LOCAL_xxx变量，但不会清除LOCAL_PATH变量；



LOCAL_LDFLAGS :=

##此变量必须包含要构建到模块中的C/C++源文件列表，不需要列出头文件和包含文件，系统会自动导入依赖
LOCAL_SRC_FILES:= src/qcarcam_test.cpp

## 变量设置头文件的include目录列表；
LOCAL_C_INCLUDES:= \
	$(LOCAL_PATH)/inc
	##$(LOCAL_PATH)/../../API/inc \
	##$(LOCAL_PATH)/../../Common/inc \
	##$(LOCAL_PATH)/../test_util/inc \
	##$(LOCA	L_PATH)/../../CameraOSServices/CameraOSServices/inc \
	##$(TARGET_OUT_HEADERS)/commonsys-intf/mm-osal/include \
	##TARGET_OUT_HEADERS = android\out\target\product\qssi\obj\include
	##$(TARGET_OUT_HEADERS)/common/inc

ifneq ($(TARGET_USES_GRALLOC1), true)
    LOCAL_C_INCLUDES  += $(LOCAL_PATH)/inc/libgralloc
else
    LOCAL_C_INCLUDES  += $(LOCAL_PATH)/inc/libgralloc1
endif #TARGET_USES_GRALLOC1

## 第十三行，额外的依赖项，表示必须该目录下必须存在Android.mk文件（悖论？）
LOCAL_ADDITIONAL_DEPENDENCIES += $(LOCAL_PATH)/usr

LOCAL_CFLAGS :=-Werror -D_ANDROID_ -DC2D_DISABLED\
	-Wno-unused-variable -Wno-unused-parameter -Wno-missing-field-initializers

#ifeq ($(call is-platform-sdk-version-at-least,28),true)
#LOCAL_HEADER_LIBRARIES := libmmosal_proprietary_headers
#endif

##表示模块在运行时要依赖的共享库（动态库），在链接时就需要，以便在生成文件时嵌入其相应的信息。
LOCAL_PROPRIETARY_MODULE := true
LOCAL_SHARED_LIBRARIES  := libais_client_prebuilt \
    libais_test_util_proprietary_prebuilt \
    libais_log_proprietary_prebuilt \
    liblog_prebuilt \
    libutils_prebuilt
	#libC2D2 \ #disabled by -DC2D_DISABLED so no need to link

#Android P and above
ifeq ($(call is-platform-sdk-version-at-least,28),true)
LOCAL_SHARED_LIBRARIES += libgui_vendor_prebuilt
else
LOCAL_SHARED_LIBRARIES += libgui_prebuilt
endif

LOCAL_MODULE:= qcarcam_test
LOCAL_MODULE_TAGS := optional
LOCAL_PROPRIETARY_MODULE := true
ifeq ($(AIS_32_BIT_FLAG), true)
LOCAL_32_BIT_ONLY := true
endif

include $(BUILD_EXECUTABLE)
